import {ContentView, ContentViewNoFooter} from '@/components/main/contentView'
import {ViewLeft} from '@/components/main/viewLeft'
import {
  ItemTable,
  getTableDatas,
  ItemMainViewNav,
  ItemModel,
  ViewLeftNav,
  ViewLeftFilter,
  ViewLeftFooter,
} from './components'

export default defineComponent({
  name: 'SysDict-items',
  setup() {
    onMounted(async () => {
      getTableDatas()
    })
    return () => (
      <div class="h-full flex">
        <ViewLeft>
          {{
            nav: () => <ViewLeftNav></ViewLeftNav>,
            content: () => <ViewLeftFilter></ViewLeftFilter>,
            footer: () => <ViewLeftFooter></ViewLeftFooter>,
          }}
        </ViewLeft>
        <ContentViewNoFooter>
          {{
            nav: () => <ItemMainViewNav></ItemMainViewNav>,
            content: () => <ItemTable></ItemTable>,
          }}
        </ContentViewNoFooter>

        <ItemModel></ItemModel>
      </div>
    )
  },
})
